/*
 *  HeartBeatController.h
 *  project8
 *
 *  Created by Luca Gobbo on 21-06-10.
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef _HEARTBEATDETECTION_H
#define _HEARTBEATDETECTION_H

#include "InfraredSensor.h"
#include "pRTOS.h"

//#include "Timer.h"





class HeartBeatDetection : public cTask   
{
	
	
public:
    HeartBeatDetection(InfraredSensor *sensor);
  
    void init();
    void update();
    InfraredSensor * theInfraredSensor;      
    
 //   void eraseData();
   // unsigned char getAVG();
  //  unsigned char getCUR();
   // unsigned char getHIG();
   // void timeOut();
private:
    int beats;
    int preAVG;
    unsigned char hbAVG;
    unsigned char hbCUR;
    unsigned char hbHIG;
    unsigned char tzMAX;
    unsigned char tzMIN;
  
  
   
    //Timer hbTimer;
};


#endif